package com.retoc.graduationtravel.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.retoc.graduationtravel.domain.ArticleContent;
import com.retoc.graduationtravel.domain.ArticleImg;
import com.retoc.graduationtravel.service.ArticleImgService;
import com.retoc.graduationtravel.mapper.ArticleImgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author retoc
 * @description 针对表【article_img】的数据库操作Service实现
 * @createDate 2022-04-17 09:44:34
 */
@Service
public class ArticleImgServiceImpl extends ServiceImpl<ArticleImgMapper, ArticleImg>
        implements ArticleImgService {

    @Autowired
    ArticleImgMapper articleImgMapper;

    @Override
    public List<String> getUrlList(Long articleId) {
//        QueryWrapper<ArticleImg> qw=new QueryWrapper<>();
//        qw.eq("article_id",articleId).select("img_url");
//        List articleImgs = articleImgMapper.selectList(qw);
        List<String> articleImgs = articleImgMapper.selectImg(articleId);
        return articleImgs;
    }
}




